package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-06
 * Time: 10:55
 */
public class Test {

    public static void eatFunc(Animal animal) {
        animal.eat();
    }

    public static void walk(IRunning iRunning) {
        iRunning.run();
    }

    public static void main(String[] args) {
        eatFunc(new Duck("唐老鸭", 10));
        eatFunc(new Fish("小鱼", 9));
    }
}
